# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-fullcontactpy
pkgname=('python2-fullcontactpy' 'python-fullcontactpy')
pkgver=0.0.6
pkgrel=10
pkgdesc='Simple Python interface for FullContact, using Requests.'
arch=('any')
url='https://pypi.python.org/pypi/fullcontact.py/'
license=('MIT')
replaces=('python2-fullcontact.py')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://pypi.python.org/packages/4d/43/250ca08ed2c005aac3d1f1c420fb67bfdfab7d6c31463f7d6f8640904ba3/FullContact.py-$pkgver.tar.gz")
sha512sums=('18d2a8085a6c489d20679b841aa16000f9bc6c5e5945350116540693f97b932f95bad3572d6be5ce9e0d4e55b22fb465acaf58050468bef0acb1c4d240a0607d')

prepare() {
  cp -a "FullContact.py-$pkgver" "FullContact.py2-$pkgver"
}

build() {
  cd "FullContact.py2-$pkgver"

  python2 setup.py build

  cd "$srcdir/FullContact.py-$pkgver"

  python setup.py build
}

package_python2-fullcontactpy() {
  depends=('python')

  cd "FullContact.py-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build
}

package_python-fullcontactpy() {
  depends=('python')

  cd "FullContact.py-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build
}

